<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkActionGroup</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="Actions.html" title="基于行为的菜单和工具栏">
<link rel="prev" href="gtk3-GtkUIManager.html" title="GtkUIManager">
<link rel="next" href="gtk3-GtkAction.html" title="GtkAction">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkUIManager.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="Actions.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkAction.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkActionGroup.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkActionGroup.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkActionGroup"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkActionGroup.top_of_page"></a>GtkActionGroup</span></h2>
<p>GtkActionGroup — A group of actions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkActionGroup.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup">GtkActionGroup</a>;
<a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="returnvalue">GtkActionGroup</span></a> *    <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-new" title="gtk_action_group_new ()">gtk_action_group_new</a>                (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-get-name" title="gtk_action_group_get_name ()">gtk_action_group_get_name</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-get-sensitive" title="gtk_action_group_get_sensitive ()">gtk_action_group_get_sensitive</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-sensitive" title="gtk_action_group_set_sensitive ()">gtk_action_group_set_sensitive</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sensitive</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-get-visible" title="gtk_action_group_get_visible ()">gtk_action_group_get_visible</a>        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-visible" title="gtk_action_group_set_visible ()">gtk_action_group_set_visible</a>        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> visible</code></em>);
<a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="returnvalue">GtkAction</span></a> *         <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-get-action" title="gtk_action_group_get_action ()">gtk_action_group_get_action</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);
<a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-list-actions" title="gtk_action_group_list_actions ()">gtk_action_group_list_actions</a>       (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-action" title="gtk_action_group_add_action ()">gtk_action_group_add_action</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-action-with-accel" title="gtk_action_group_add_action_with_accel ()">gtk_action_group_add_action_with_accel</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accelerator</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-remove-action" title="gtk_action_group_remove_action ()">gtk_action_group_remove_action</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);
struct              <a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry">GtkActionEntry</a>;
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-actions" title="gtk_action_group_add_actions ()">gtk_action_group_add_actions</a>        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry"><span class="type">GtkActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-actions-full" title="gtk_action_group_add_actions_full ()">gtk_action_group_add_actions_full</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry"><span class="type">GtkActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
struct              <a class="link" href="gtk3-GtkActionGroup.html#GtkToggleActionEntry" title="struct GtkToggleActionEntry">GtkToggleActionEntry</a>;
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-toggle-actions" title="gtk_action_group_add_toggle_actions ()">gtk_action_group_add_toggle_actions</a> (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkToggleActionEntry" title="struct GtkToggleActionEntry"><span class="type">GtkToggleActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-toggle-actions-full" title="gtk_action_group_add_toggle_actions_full ()">gtk_action_group_add_toggle_actions_full</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkToggleActionEntry" title="struct GtkToggleActionEntry"><span class="type">GtkToggleActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
struct              <a class="link" href="gtk3-GtkActionGroup.html#GtkRadioActionEntry" title="struct GtkRadioActionEntry">GtkRadioActionEntry</a>;
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-radio-actions" title="gtk_action_group_add_radio_actions ()">gtk_action_group_add_radio_actions</a>  (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkRadioActionEntry" title="struct GtkRadioActionEntry"><span class="type">GtkRadioActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>,
                                                         <em class="parameter"><code><a href="../gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> on_change</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-radio-actions-full" title="gtk_action_group_add_radio_actions_full ()">gtk_action_group_add_radio_actions_full</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkRadioActionEntry" title="struct GtkRadioActionEntry"><span class="type">GtkRadioActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>,
                                                         <em class="parameter"><code><a href="../gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> on_change</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);
<a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             (<a class="link" href="gtk3-GtkActionGroup.html#GtkTranslateFunc" title="GtkTranslateFunc ()">*GtkTranslateFunc</a>)                 (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translate-func" title="gtk_action_group_set_translate_func ()">gtk_action_group_set_translate_func</a> (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkTranslateFunc" title="GtkTranslateFunc ()"><span class="type">GtkTranslateFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()">gtk_action_group_set_translation_domain</a>
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-translate-string" title="gtk_action_group_translate_string ()">gtk_action_group_translate_string</a>   (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkActionGroup.description"></a><h2>Description</h2>
<p>
Actions are organised into groups. An action group is essentially a
map from names to <a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> objects.
</p>
<p>
All actions that would make sense to use in a particular context
should be in a single group. Multiple action groups may be used for a
particular user interface. In fact, it is expected that most nontrivial
applications will make use of multiple groups. For example, in an
application that can edit multiple documents, one group holding global
actions (e.g. quit, about, new), and one group per document holding
actions that act on that document (eg. save, cut/copy/paste, etc). Each
window's menus would be constructed from a combination of two action
groups.
</p>
<p><a name="Action-Accel"></a>
Accelerators are handled by the GTK+ accelerator map. All actions are
assigned an accelerator path (which normally has the form
<code class="literal">&lt;Actions&gt;/group-name/action-name</code>)
and a shortcut is associated with this accelerator path. All menuitems
and toolitems take on this accelerator path. The GTK+ accelerator map
code makes sure that the correct shortcut is displayed next to the menu
item.
</p>
<p>
</p>
<div class="refsect2">
<a name="GtkActionGroup-BUILDER-UI"></a><h3>GtkActionGroup as GtkBuildable</h3>
<p>
The <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> implementation of the <a class="link" href="gtk3-GtkBuildable.html#GtkBuildable" title="GtkBuildable"><span class="type">GtkBuildable</span></a> interface accepts
<a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> objects as &lt;child&gt; elements in UI definitions.
</p>
<p>
Note that it is probably more common to define actions and action groups
in the code, since they are directly related to what the code can do.
</p>
<p>
The GtkActionGroup implementation of the GtkBuildable interface supports
a custom &lt;accelerator&gt; element, which has attributes named key and
modifiers and allows to specify accelerators. This is similar to the
&lt;accelerator&gt; element of <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a>, the main difference is that
it doesn't allow you to specify a signal.
</p>
<div class="example">
<a name="id3652032"></a><p class="title"><b>Example 70. A <a class="link" href="gtk3-GtkDialog.html#GtkDialog" title="struct GtkDialog"><span class="type">GtkDialog</span></a> UI definition fragment.</b></p>
<div class="example-contents"><pre class="programlisting">
&lt;object class="GtkActionGroup" id="actiongroup"&gt;
  &lt;child&gt;
      &lt;object class="GtkAction" id="About"&gt;
          &lt;property name="name"&gt;About&lt;/property&gt;
          &lt;property name="stock_id"&gt;gtk-about&lt;/property&gt;
          &lt;signal handler="about_activate" name="activate"/&gt;
      &lt;/object&gt;
      &lt;accelerator key="F1" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK"/&gt;
  &lt;/child&gt;
&lt;/object&gt;
</pre></div>
</div>
<br class="example-break">
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkActionGroup.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkActionGroup"></a><h3>struct GtkActionGroup</h3>
<pre class="programlisting">struct GtkActionGroup {
  GObject parent;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-new"></a><h3>gtk_action_group_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="returnvalue">GtkActionGroup</span></a> *    gtk_action_group_new                (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Creates a new <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> object. The name of the action group
is used when associating <a class="link" href="gtk3-GtkActionGroup.html#Action-Accel">keybindings</a> 
with the actions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the action group.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-get-name"></a><h3>gtk_action_group_get_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_action_group_get_name           (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);</pre>
<p>
Gets the name of the action group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the name of the action group.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-get-sensitive"></a><h3>gtk_action_group_get_sensitive ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_action_group_get_sensitive      (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);</pre>
<p>
Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the group is sensitive.  The constituent actions
can only be logically sensitive (see <a class="link" href="gtk3-GtkAction.html#gtk-action-is-sensitive" title="gtk_action_is_sensitive ()"><code class="function">gtk_action_is_sensitive()</code></a>) if
they are sensitive (see <a class="link" href="gtk3-GtkAction.html#gtk-action-get-sensitive" title="gtk_action_get_sensitive ()"><code class="function">gtk_action_get_sensitive()</code></a>) and their group
is sensitive.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the group is sensitive.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-set-sensitive"></a><h3>gtk_action_group_set_sensitive ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_set_sensitive      (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sensitive</code></em>);</pre>
<p>
Changes the sensitivity of <em class="parameter"><code>action_group</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>sensitive</code></em> :</span></p></td>
<td>new sensitivity</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-get-visible"></a><h3>gtk_action_group_get_visible ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_action_group_get_visible        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);</pre>
<p>
Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the group is visible.  The constituent actions
can only be logically visible (see <a class="link" href="gtk3-GtkAction.html#gtk-action-is-visible" title="gtk_action_is_visible ()"><code class="function">gtk_action_is_visible()</code></a>) if
they are visible (see <a class="link" href="gtk3-GtkAction.html#gtk-action-get-visible" title="gtk_action_get_visible ()"><code class="function">gtk_action_get_visible()</code></a>) and their group
is visible.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the group is visible.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-set-visible"></a><h3>gtk_action_group_set_visible ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_set_visible        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> visible</code></em>);</pre>
<p>
Changes the visible of <em class="parameter"><code>action_group</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>visible</code></em> :</span></p></td>
<td>new visiblity</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-get-action"></a><h3>gtk_action_group_get_action ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="returnvalue">GtkAction</span></a> *         gtk_action_group_get_action         (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_name</code></em>);</pre>
<p>
Looks up an action in the action group by name.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_name</code></em> :</span></p></td>
<td>the name of the action</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the action, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no action by that name exists. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-list-actions"></a><h3>gtk_action_group_list_actions ()</h3>
<pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             gtk_action_group_list_actions       (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>);</pre>
<p>
Lists the actions in the action group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>an allocated list of the action objects in the action group. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkAction][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-action"></a><h3>gtk_action_group_add_action ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_action         (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);</pre>
<p>
Adds an action object to the action group. Note that this function
does not set up the accel path of the action, which can lead to problems
if a user tries to modify the accelerator of a menuitem associated with
the action. Therefore you must either set the accel path yourself with
<a class="link" href="gtk3-GtkAction.html#gtk-action-set-accel-path" title="gtk_action_set_accel_path ()"><code class="function">gtk_action_set_accel_path()</code></a>, or use 
<code class="literal">gtk_action_group_add_action_with_accel (..., NULL)</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
<td>an action</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-action-with-accel"></a><h3>gtk_action_group_add_action_with_accel ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_action_with_accel
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> *action</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *accelerator</code></em>);</pre>
<p>
Adds an action object to the action group and sets up the accelerator.
</p>
<p>
If <em class="parameter"><code>accelerator</code></em> is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, attempts to use the accelerator associated 
with the stock_id of the action. 
</p>
<p>
Accel paths are set to
<code class="literal">&lt;Actions&gt;/<em class="replaceable"><code>group-name</code></em>/<em class="replaceable"><code>action-name</code></em></code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
<td>the action to add</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>accelerator</code></em> :</span></p></td>
<td>the accelerator for the action, in
the format understood by <a class="link" href="gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse" title="gtk_accelerator_parse ()"><code class="function">gtk_accelerator_parse()</code></a>, or "" for no accelerator, or
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the stock accelerator. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-remove-action"></a><h3>gtk_action_group_remove_action ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_remove_action      (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkAction.html#GtkAction" title="struct GtkAction"><span class="type">GtkAction</span></a> *action</code></em>);</pre>
<p>
Removes an action object from the action group.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>action</code></em> :</span></p></td>
<td>an action</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkActionEntry"></a><h3>struct GtkActionEntry</h3>
<pre class="programlisting">struct GtkActionEntry {
  const gchar     *name;
  const gchar     *stock_id;
  const gchar     *label;
  const gchar     *accelerator;
  const gchar     *tooltip;
  GCallback  callback;
};
</pre>
<p>
<a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry"><span class="type">GtkActionEntry</span></a> structs are used with <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-actions" title="gtk_action_group_add_actions ()"><code class="function">gtk_action_group_add_actions()</code></a> to
construct actions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkActionEntry.name"></a>name</code></em>;</span></p></td>
<td>The name of the action.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkActionEntry.stock-id"></a>stock_id</code></em>;</span></p></td>
<td>The stock id for the action, or the name of an icon from the
icon theme.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkActionEntry.label"></a>label</code></em>;</span></p></td>
<td>The label for the action. This field should typically be marked
for translation, see <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>. If
<em class="parameter"><code>label</code></em> is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the label of the stock item with id <em class="parameter"><code>stock_id</code></em> is used.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkActionEntry.accelerator"></a>accelerator</code></em>;</span></p></td>
<td>The accelerator for the action, in the format understood by
<a class="link" href="gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse" title="gtk_accelerator_parse ()"><code class="function">gtk_accelerator_parse()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkActionEntry.tooltip"></a>tooltip</code></em>;</span></p></td>
<td>The tooltip for the action. This field should typically be
marked for translation, see <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><a href="../gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> <em class="structfield"><code><a name="GtkActionEntry.callback"></a>callback</code></em>;</span></p></td>
<td>The function to call when the action is activated.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-actions"></a><h3>gtk_action_group_add_actions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_actions        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry"><span class="type">GtkActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
This is a convenience function to create a number of actions and add them 
to the action group.
</p>
<p>
The "activate" signals of the actions are connected to the callbacks and 
their accel paths are set to 
<code class="literal">&lt;Actions&gt;/<em class="replaceable"><code>group-name</code></em>/<em class="replaceable"><code>action-name</code></em></code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>an array of action descriptions. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_entries]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_entries</code></em> :</span></p></td>
<td>the number of entries</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to the action callbacks</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-actions-full"></a><h3>gtk_action_group_add_actions_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_actions_full   (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry"><span class="type">GtkActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
This variant of <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-actions" title="gtk_action_group_add_actions ()"><code class="function">gtk_action_group_add_actions()</code></a> adds a <a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a>
callback for <em class="parameter"><code>user_data</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>an array of action descriptions. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_entries]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_entries</code></em> :</span></p></td>
<td>the number of entries</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to the action callbacks</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>destroy notification callback for <em class="parameter"><code>user_data</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkToggleActionEntry"></a><h3>struct GtkToggleActionEntry</h3>
<pre class="programlisting">struct GtkToggleActionEntry {
  const gchar     *name;
  const gchar     *stock_id;
  const gchar     *label;
  const gchar     *accelerator;
  const gchar     *tooltip;
  GCallback  callback;
  gboolean   is_active;
};
</pre>
<p>
<a class="link" href="gtk3-GtkActionGroup.html#GtkToggleActionEntry" title="struct GtkToggleActionEntry"><span class="type">GtkToggleActionEntry</span></a> structs are used with
<a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-toggle-actions" title="gtk_action_group_add_toggle_actions ()"><code class="function">gtk_action_group_add_toggle_actions()</code></a> to construct toggle actions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkToggleActionEntry.name"></a>name</code></em>;</span></p></td>
<td>The name of the action.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkToggleActionEntry.stock-id"></a>stock_id</code></em>;</span></p></td>
<td>The stock id for the action, or the name of an icon from the
icon theme.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkToggleActionEntry.label"></a>label</code></em>;</span></p></td>
<td>The label for the action. This field should typically be marked
for translation, see <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkToggleActionEntry.accelerator"></a>accelerator</code></em>;</span></p></td>
<td>The accelerator for the action, in the format understood by
<a class="link" href="gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse" title="gtk_accelerator_parse ()"><code class="function">gtk_accelerator_parse()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkToggleActionEntry.tooltip"></a>tooltip</code></em>;</span></p></td>
<td>The tooltip for the action. This field should typically be
marked for translation, see <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><a href="../gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> <em class="structfield"><code><a name="GtkToggleActionEntry.callback"></a>callback</code></em>;</span></p></td>
<td>The function to call when the action is activated.</td>
</tr>
<tr>
<td><p><span class="term"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GtkToggleActionEntry.is-active"></a>is_active</code></em>;</span></p></td>
<td>The initial state of the toggle action.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-toggle-actions"></a><h3>gtk_action_group_add_toggle_actions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_toggle_actions (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkToggleActionEntry" title="struct GtkToggleActionEntry"><span class="type">GtkToggleActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
This is a convenience function to create a number of toggle actions and add them 
to the action group.
</p>
<p>
The "activate" signals of the actions are connected to the callbacks and 
their accel paths are set to 
<code class="literal">&lt;Actions&gt;/<em class="replaceable"><code>group-name</code></em>/<em class="replaceable"><code>action-name</code></em></code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>an array of toggle action descriptions. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_entries]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_entries</code></em> :</span></p></td>
<td>the number of entries</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to the action callbacks</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-toggle-actions-full"></a><h3>gtk_action_group_add_toggle_actions_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_toggle_actions_full
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkToggleActionEntry" title="struct GtkToggleActionEntry"><span class="type">GtkToggleActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
This variant of <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-toggle-actions" title="gtk_action_group_add_toggle_actions ()"><code class="function">gtk_action_group_add_toggle_actions()</code></a> adds a 
<a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback for <em class="parameter"><code>user_data</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>an array of toggle action descriptions. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_entries]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_entries</code></em> :</span></p></td>
<td>the number of entries</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to the action callbacks</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>destroy notification callback for <em class="parameter"><code>user_data</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkRadioActionEntry"></a><h3>struct GtkRadioActionEntry</h3>
<pre class="programlisting">struct GtkRadioActionEntry {
  const gchar *name;
  const gchar *stock_id;
  const gchar *label;
  const gchar *accelerator;
  const gchar *tooltip;
  gint   value; 
};
</pre>
<p>
<a class="link" href="gtk3-GtkActionGroup.html#GtkRadioActionEntry" title="struct GtkRadioActionEntry"><span class="type">GtkRadioActionEntry</span></a> structs are used with
<a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-radio-actions" title="gtk_action_group_add_radio_actions ()"><code class="function">gtk_action_group_add_radio_actions()</code></a> to construct groups of radio actions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkRadioActionEntry.name"></a>name</code></em>;</span></p></td>
<td>The name of the action.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkRadioActionEntry.stock-id"></a>stock_id</code></em>;</span></p></td>
<td>The stock id for the action, or the name of an icon from the
icon theme.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkRadioActionEntry.label"></a>label</code></em>;</span></p></td>
<td>The label for the action. This field should typically be marked
for translation, see <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkRadioActionEntry.accelerator"></a>accelerator</code></em>;</span></p></td>
<td>The accelerator for the action, in the format understood by
<a class="link" href="gtk3-Keyboard-Accelerators.html#gtk-accelerator-parse" title="gtk_accelerator_parse ()"><code class="function">gtk_accelerator_parse()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GtkRadioActionEntry.tooltip"></a>tooltip</code></em>;</span></p></td>
<td>The tooltip for the action. This field should typically be
marked for translation, see <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GtkRadioActionEntry.value"></a>value</code></em>;</span></p></td>
<td>The value to set on the radio action. See
<a class="link" href="gtk3-GtkRadioAction.html#gtk-radio-action-get-current-value" title="gtk_radio_action_get_current_value ()"><code class="function">gtk_radio_action_get_current_value()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-radio-actions"></a><h3>gtk_action_group_add_radio_actions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_radio_actions  (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkRadioActionEntry" title="struct GtkRadioActionEntry"><span class="type">GtkRadioActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>,
                                                         <em class="parameter"><code><a href="../gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> on_change</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
This is a convenience routine to create a group of radio actions and
add them to the action group. 
</p>
<p>
The "changed" signal of the first radio action is connected to the 
<em class="parameter"><code>on_change</code></em> callback and the accel paths of the actions are set to 
<code class="literal">&lt;Actions&gt;/<em class="replaceable"><code>group-name</code></em>/<em class="replaceable"><code>action-name</code></em></code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>an array of radio action descriptions. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_entries]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_entries</code></em> :</span></p></td>
<td>the number of entries</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the value of the action to activate initially, or -1 if
no action should be activated</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>on_change</code></em> :</span></p></td>
<td>the callback to connect to the changed signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to the action callbacks</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-add-radio-actions-full"></a><h3>gtk_action_group_add_radio_actions_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_add_radio_actions_full
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a class="link" href="gtk3-GtkActionGroup.html#GtkRadioActionEntry" title="struct GtkRadioActionEntry"><span class="type">GtkRadioActionEntry</span></a> *entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_entries</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>,
                                                         <em class="parameter"><code><a href="../gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> on_change</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>
This variant of <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-radio-actions" title="gtk_action_group_add_radio_actions ()"><code class="function">gtk_action_group_add_radio_actions()</code></a> adds a 
<a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback for <em class="parameter"><code>user_data</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>the action group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
<td>an array of radio action descriptions. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_entries]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_entries</code></em> :</span></p></td>
<td>the number of entries</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the value of the action to activate initially, or -1 if
no action should be activated</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>on_change</code></em> :</span></p></td>
<td>the callback to connect to the changed signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to the action callbacks</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
<td>destroy notification callback for <em class="parameter"><code>user_data</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkTranslateFunc"></a><h3>GtkTranslateFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             (*GtkTranslateFunc)                 (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func_data</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-set-translate-func"></a><h3>gtk_action_group_set_translate_func ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_set_translate_func (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkTranslateFunc" title="GtkTranslateFunc ()"><span class="type">GtkTranslateFunc</span></a> func</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>
Sets a function to be used for translating the <em class="parameter"><code>label</code></em> and <em class="parameter"><code>tooltip</code></em> of 
<span class="type">GtkActionGroupEntry</span>s added by <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-actions" title="gtk_action_group_add_actions ()"><code class="function">gtk_action_group_add_actions()</code></a>.
</p>
<p>
If you're using <code class="function">gettext()</code>, it is enough to set the translation domain
with <a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translation-domain" title="gtk_action_group_set_translation_domain ()"><code class="function">gtk_action_group_set_translation_domain()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkActionGroup.html#GtkTranslateFunc" title="GtkTranslateFunc ()"><span class="type">GtkTranslateFunc</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>data to be passed to <em class="parameter"><code>func</code></em> and <em class="parameter"><code>notify</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
<td>a <a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> function to be called when <em class="parameter"><code>action_group</code></em> is
destroyed and when the translation function is changed again</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-set-translation-domain"></a><h3>gtk_action_group_set_translation_domain ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_action_group_set_translation_domain
                                                        (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *domain</code></em>);</pre>
<p>
Sets the translation domain and uses <a href="../glib/glib-I18N.html#g-dgettext"><code class="function">g_dgettext()</code></a> for translating the 
<em class="parameter"><code>label</code></em> and <em class="parameter"><code>tooltip</code></em> of <a class="link" href="gtk3-GtkActionGroup.html#GtkActionEntry" title="struct GtkActionEntry"><span class="type">GtkActionEntry</span></a>s added by 
<a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-add-actions" title="gtk_action_group_add_actions ()"><code class="function">gtk_action_group_add_actions()</code></a>.
</p>
<p>
If you're not using <code class="function">gettext()</code> for localization, see 
<a class="link" href="gtk3-GtkActionGroup.html#gtk-action-group-set-translate-func" title="gtk_action_group_set_translate_func ()"><code class="function">gtk_action_group_set_translate_func()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>the translation domain to use for <a href="../glib/glib-I18N.html#g-dgettext"><code class="function">g_dgettext()</code></a> calls</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-action-group-translate-string"></a><h3>gtk_action_group_translate_string ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_action_group_translate_string   (<em class="parameter"><code><a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a> *action_group</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<p>
Translates a string using the specified <code class="function">translate_func()</code>. This
is mainly intended for language bindings.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>action_group</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkActionGroup.html#GtkActionGroup" title="struct GtkActionGroup"><span class="type">GtkActionGroup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a string</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the translation of <em class="parameter"><code>string</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>